lst = list(range(1, 10))

# 切分列表，[start:end:步长]
print(lst[1:6:1])

# 步长默认=1
print(lst[1:5])
print(lst[1:4:])

# start 默认=0
print(lst[:6:2])

# end 默认=end
print(lst[2::2])

print("-------------------步长为负数----------------------------------")

print(lst[::-1])

print(lst[7::-1])

print(lst[7:3:-1])

# 切割不到 空列表
print(lst[2:7:-1])
